package org.example.dev.learn.testdecorator;

public class Client {

    public static void main(String[] args) {
        Component component = new ConcreteComponent();

        // 第一修饰
        component = (Component) new ConcreteDecorator1(component);

        // 第二修饰
        component = (Component)new ConcreteDecorator2(component);

        // 修饰后运行
        component.operate();
    }

}